package cn.org.xiaosheng.client.controller;

import cn.org.xiaosheng.client.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author XiaoSheng
 * @date 2024/8/22 下午7:12
 */
@RestController
public class HelloController {

    @Autowired
    public HelloService helloService;

    @GetMapping("/hello")
    public String hello(String name) {
        return helloService.sayHello(name).toString();
    }

    @GetMapping("/hello2")
    public String hello1(String name) {
        return helloService.sayHello2(name);
    }
}
